1. Field of the Invention
The present invention relates to an electronic musical instrument, and more particularly, to a system therein for receiving and processing the key state data supplied from a keyboard, sequencer or the like.
2. Description of Related Art
Electronic musical instruments are generally constructed such that various processings such as the allotting of musical tone-generating channels channels to key state data or key operation data will be effected based on the received key state data It is to be noted that the key state data are produced in electronic musical instruments independently of the progress of the processings of key-depression or key-release, because such key state data correspond to keyboard operation per se including key-depression and key-release, or correspond to the reading of music information out of a sequencer Therefore, it is necessary for the received key state data to be temporarily stored in a memory device so that it can be read on demand and in response to the progress of the processings. The following systems are used for temporary storage of the key state data.
First-in First-out System: Received key state data are sequentially written into a register called "FIFO", in the order of reception, according to the reception interrupt routine. The temporarily stored data are then read sequentially out of the FIFO and delivered to the main routine so as to execute the key-depression or key-release processings.
Map System: A new-note map and an older-note map are employed, with the former map registering the received key state data and recording their musical pitches, wherein the latter map registers for each musical pitch the commands given to the musical tone-generating channels to carry out the processing of key-depression or key-release. The contents of the new-note and older-note maps are sequentially compared with each other. If there is found any difference between these maps, then or the key-depression or -release processings are effected depending on the key state data registered on the new-note map.